import { createSlice } from '@reduxjs/toolkit'

const initialState = {
  token:''
}

export const counterSlice = createSlice({
  name: 'counter',
  initialState,
  reducers: {

    username: (state, action) => {
      state.token = action.payload
      console.log(action.payload);
      
    },
  },
})

// Action creators are generated for each case reducer function
export const {  username } = counterSlice.actions

export default counterSlice.reducer